package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.FestivalHolidayMapper;
import com.ruoyi.system.domain.FestivalHoliday;
import com.ruoyi.system.service.IFestivalHolidayService;

/**
 * 节假日配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-12-20
 */
@Service
public class FestivalHolidayServiceImpl implements IFestivalHolidayService 
{
    @Autowired
    private FestivalHolidayMapper festivalHolidayMapper;

    /**
     * 查询节假日配置
     * 
     * @param id 节假日配置主键
     * @return 节假日配置
     */
    @Override
    public FestivalHoliday selectFestivalHolidayById(Integer id)
    {
        return festivalHolidayMapper.selectFestivalHolidayById(id);
    }

    /**
     * 查询节假日配置列表
     * 
     * @param festivalHoliday 节假日配置
     * @return 节假日配置
     */
    @Override
    public List<FestivalHoliday> selectFestivalHolidayList(FestivalHoliday festivalHoliday)
    {
        return festivalHolidayMapper.selectFestivalHolidayList(festivalHoliday);
    }

    /**
     * 新增节假日配置
     * 
     * @param festivalHoliday 节假日配置
     * @return 结果
     */
    @Override
    public int insertFestivalHoliday(FestivalHoliday festivalHoliday)
    {
        return festivalHolidayMapper.insertFestivalHoliday(festivalHoliday);
    }

    /**
     * 修改节假日配置
     * 
     * @param festivalHoliday 节假日配置
     * @return 结果
     */
    @Override
    public int updateFestivalHoliday(FestivalHoliday festivalHoliday)
    {
        return festivalHolidayMapper.updateFestivalHoliday(festivalHoliday);
    }

    /**
     * 批量删除节假日配置
     * 
     * @param ids 需要删除的节假日配置主键
     * @return 结果
     */
    @Override
    public int deleteFestivalHolidayByIds(Integer[] ids)
    {
        return festivalHolidayMapper.deleteFestivalHolidayByIds(ids);
    }

    /**
     * 删除节假日配置信息
     * 
     * @param id 节假日配置主键
     * @return 结果
     */
    @Override
    public int deleteFestivalHolidayById(Integer id)
    {
        return festivalHolidayMapper.deleteFestivalHolidayById(id);
    }
}
